package com.xixibaby.core.login;

public class AuthLocal {
    private static final ThreadLocal<LoginInfoVO> AUTH_VO_THREAD_LOCAL = new ThreadLocal<>();

    /**
     * 获取当前登录的用户信息 不是账号信息
     * @return
     */
    public static LoginInfoVO getAuthVO(){
        return AUTH_VO_THREAD_LOCAL.get();
    }

    /**
     * 获取当前登录的用户信息 不是账号信息
     * @return
     */
    public static void setAuthVO(LoginInfoVO vo){
        AUTH_VO_THREAD_LOCAL.set(vo);
    }

    public static void cleanAuthVO(){
        AUTH_VO_THREAD_LOCAL.remove();
    }

}
